package com.dhcc.DRGsHosp.facade.impl;

import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import javax.inject.Named;

import org.springframework.beans.factory.annotation.Autowired;

import com.dhcc.DRGsHosp.application.BenchmarkViewApplication;
import com.dhcc.DRGsHosp.facade.BenchmarkViewFacade;
import com.dhcc.DRGsHosp.facade.DrgsIndexCalFacade;
@Named
public  class BenchmarkViewFacadeImpl implements BenchmarkViewFacade{
	@Autowired
	private BenchmarkViewApplication benchmarkViewApplication;
	@Autowired
	private DrgsIndexCalFacade drgsIndexCalFacade;


	/**
	 *  @Description获取分组其版本：
	 *  @Author liuhongjun 
	 *  @see com.dhcc.DRGsHosp.facade.BenchmarkViewFacade#getGroupVersion()
	 */
	@Override
	public List<Map<String, Object>>  getGroupVersion(){ 
		return benchmarkViewApplication.getGroupVersion();
	}
	/**
	 *  @Description：获取标杆年份
	 *  @Author liuhongjun 
	 *  @see com.dhcc.DRGsHosp.facade.BenchmarkViewFacade#getBenchYears(java.lang.String)
	 */
	@Override
	public List<Map<String, Object>>  getBenchYears(String type,String benchType,String verCode) {
		List<Map<String, Object>> list=new LinkedList<Map<String,Object>>();
		if("1".equals(type)) {
			list=benchmarkViewApplication.findYearBench(benchType, verCode);
		}else if("2".equals(type)) {
			list=benchmarkViewApplication.findManagerBench(benchType, verCode);
		}else if("3".equals(type)) {
			list=benchmarkViewApplication.findStdBench(benchType);
		}
		return list;
	}
	
	/**
	 @description  ：获取标杆类型
	 *  @Author： fulianxia
	 *  @param type 类型
	 *  @param verCode 分组器版本号
	 *  @return
	 *  @Date  :2018年5月4日
	 */
	@Override
	public List<Map<String, Object>> getBenchType(String type,String verCode){
		List<Map<String, Object>> list=null;
		list=benchmarkViewApplication.findBenchType(type,verCode);
		return list;
	}
	
	/**
	 *  @Description：获取年度标杆
	 *  @Author liuhongjun 
	 *  @see com.dhcc.DRGsHosp.facade.BenchmarkViewFacade#getStdBenchData(java.lang.String, java.lang.String, java.lang.String)
	 */
	@Override
	public List<Map<String, Object>> getStdBenchData(String version, String stdYear, String stdType) {
		return benchmarkViewApplication.getStdBenchData( version,  stdYear,  stdType);
	}
	/**
	 *  @Description：获取绩效标杆
	 *  @Author liuhongjun 
	 *  @see com.dhcc.DRGsHosp.facade.BenchmarkViewFacade#getManagerBencahData(java.lang.String, java.lang.String, java.lang.String)
	 */
	@Override
	public List<Map<String, Object>> getManagerBencahData(String managerObj, String stdYear, String stdType) {
		return benchmarkViewApplication.getManagerBencahData( managerObj,  stdYear,  stdType);
	}
	/**
	 *  @Description：获取标杆比数据
	 *  @Author liuhongjun 
	 *  @see com.dhcc.DRGsHosp.facade.BenchmarkViewFacade#getBencahData(java.lang.String, java.lang.String)
	 */
	@Override
	public List<Map<String, Object>>  getBencahData(String stdYear, String stdType) {
		return benchmarkViewApplication.getBencahData( stdYear,  stdType);
	}
}
